<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	template="/resources/layout/templateInterno.xhtml"
	xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
	<ui:define name="home">
	<div style="margin-left: 10px" class="grid-11-12">
		<h1>Seja bem-vindo ao sistema!</h1>
	</div>
		
		
		
		    <style>
				h2 {
				  font: 40 40px/1.5 Helvetica, Verdana, sans-serif;
				  margin: 1;
				  padding: 1;
				}
				 
				ul {
				  list-style-type: none;
				  margin: 0;
				  padding: 0;
				}
				 
				li {
				  font: 20 20px/1.5 Helvetica, Verdana, sans-serif;
				  border-bottom: 1px solid #ccc;
				}
				 
				li:last-child {
				  border: none;
				}
				 
				li a {
				  text-decoration: none;
				  color: #000;
				  display: block;
				  width: 200px;
				 
				  
				}

 
/*li a:hover {
  font-size: 15px;
  background: #f6f6f6;
}*/
	
    </style>	
		<h:form  id="formMural" styleClass="form" >
		
		<div style="width=10px;"	>
		</div>
		     <div id="logo_fundo">
		     	
		     
		     	
		     	<script >
	    		var $j = jQuery.noConflict();

	    		jQuery(document).ready(function(){
	    			
	    			var niverMes = $j("#formMural\\:niverMes").val();
	    			var niverDia = $j("#formMural\\:niverDia").val();
	    			var agendaMes = $j("#formMural\\:agendaMes").val();
	    			var agendaDia = $j("#formMural\\:agendaDia").val();
					
			    	mostrar_banner('LocalAnuncios1', niverMes, niverDia, agendaMes,agendaDia);
	    			
	    			
	    			 });
		     	
		     	</script> 
		     <h:panelGroup id="gpBanner">	
		     	<h:inputHidden id="niverMes" value="#{baseView.bannerAnviersariosMes}" />
		     	<h:inputHidden id="niverDia" value="#{baseView.bannerAniverssariosDia}" />
		     	<h:inputHidden id="agendaMes" value="#{baseView.bannerCompromissosMes}" />
		     	<h:inputHidden id="agendaDia" value="#{baseView.bannerCompromissosDia}" />
		     </h:panelGroup>
		   	 
		     </div>
		     <div  id="mural_ver_detalhes">
		     
		     
		     
		     </div>
		      <div class="field-clear"></div>
		      <a4j:jsFunction id="jsVerDetalhes"  ajaxSingle="true" name="verDetalhes" reRender="panelNiverCompromisso"  oncomplete="#{rich:component('panelNiverCompromisso')}.show()"  action="#{calendarDataModel.verTudo}"  >
					 <a4j:actionparam name="param1" assignTo="#{calendarDataModel.opMural}"  />                  
				 </a4j:jsFunction>
		     	
		     	
		     <div id="mural" style="float:rigth; margin-left: 570px">	     	
		     		
			     		<div style="width:50px">
			     		<a4j:region>	
				     		<a4j:commandLink value="1" onclick="escolher_banner(0)" ></a4j:commandLink>
				     		<h:outputLabel  value="-"/> 	
				     		<a4j:commandLink value="2"  onclick="escolher_banner(1)" ></a4j:commandLink>
				     		<h:outputLabel  value="-"> </h:outputLabel>
				     		<a4j:commandLink value="3" onclick="escolher_banner(2)" ></a4j:commandLink>
				     		<h:outputLabel value="-"  /> 
				     		<a4j:commandLink value="4" onclick="escolher_banner(3)" ></a4j:commandLink>
				     	</a4j:region>
			     		</div>
			     		
		     		</div>
		     		
		</h:form>
		
		
		
		<rich:modalPanel id="panelNiverCompromisso" width="900" height="300"   style="overflow: auto;" resizeable="false">
		
			<f:facet name="header">Detalhes</f:facet>
				 <f:facet name="controls">
			            <h:panelGroup>
			            <h:form>
			              	<a4j:commandLink reRender="gpBanner" onclick="Richfaces.hideModalPanel('panelNiverCompromisso')" >
			              		<h:graphicImage value="/resources/imagens/close.png" id="giAdd" styleClass="hidelink"/>
			              	</a4j:commandLink>
			              </h:form>	                
			            </h:panelGroup>
			        </f:facet>
			
			<h:form id="verDetalhesMural" styleClass="form">
			<a4j:outputPanel  id="pgMensagemCompromisso">
						<div class="grid-7-12">
						  <h:messages id="msCompromisso"  errorClass="form-msg-error_modal" infoClass="form-msg-success_modal" />
						</div>
			</a4j:outputPanel>
			<div class="grid-12-12"  > 
				<h:panelGroup rendered="#{not empty calendarDataModel.listaMembro}" style="width:900px" id="editContent">
				<div style="margin-bottom: 250px; overflow: auto;"  >
					 <a4j:outputPanel id="panelMembroNiver" style="width:700px" ajaxRendered="true"> 
						 <rich:dataTable style="width: 600px; border:1px;margin-bottom: 100px" 
						 styleClass="dataTable rich-table rich-table-cell ui-widget-content ui-grid-content" rowClasses="odd, even"
						 id="tbNiverMembro"  var="membro" value="#{calendarDataModel.listaMembro}" >
						  <f:facet  name="header">
					                    <rich:columnGroup >
					                            <rich:column style="text-align: left"  styleClass="ui-state-default" >
					                                <strong><h:outputText value="Nome" /></strong>
					                            </rich:column>
					                            <rich:column style="text-align: left" styleClass="ui-state-default" >
					                                <strong><h:outputText value="Data" /></strong>
					                            </rich:column>
					                            <rich:column style="text-align: left" styleClass="ui-state-default" >
					                                <strong><h:outputText value="Igreja" /></strong>
					                            </rich:column>
					                    	</rich:columnGroup>
					                  </f:facet>
					 				<rich:columnGroup >	
										<rich:column  >
											<h:outputText value="#{membro.nome}" />
										</rich:column>
										 <rich:column>
											<h:outputText value="#{membro.dtNascimento}" />
										</rich:column>	
										 <rich:column>
											<h:outputText value="#{membro.noIgrejaPertence}" />
										</rich:column>
										
									</rich:columnGroup>
						</rich:dataTable> 
					</a4j:outputPanel>
					</div>
				<rich:datascroller renderIfSinglePage="false" for="tbNiverMembro"  />
				 <div class="field-clear"></div>
					 <div class="grid-2-12" style="margin-left:270px;">
						<a4j:commandButton action="#{baseView.redirect}" value="Enviar Email" >
						 	<f:setPropertyActionListener target="#{baseView.foward}" value="carregarEnviarEmail" />
						 	<f:setPropertyActionListener target="#{enviarEmailBean.listaNiverMembroVisitante}" value="#{calendarDataModel.listaMembro}" />
						</a4j:commandButton>
					</div>
				</h:panelGroup>
				
				<h:panelGroup rendered="#{not empty calendarDataModel.listaCompromisso}" style="width:800px" id="pgDetCompromisso">
					 
						 <rich:dataTable style="width: 800px; border:1px" id="tbAgenda" var="compromisso" rows="5"
						  styleClass="dataTable rich-table rich-table-cell ui-widget-content ui-grid-content" rowClasses="odd, even"
						 value="#{calendarDataModel.listaCompromisso}" >
						  <f:facet  name="header">
					                    <rich:columnGroup >
					                    		<rich:column style="text-align: left" styleClass="ui-state-default" >
					                                <strong><h:outputText value="Nome" /></strong>
					                            </rich:column>
					                            <rich:column style="text-align: left; ;width: 130px"  styleClass="ui-state-default" >
					                                <strong><h:outputText value="Data/Horário" /></strong>
					                            </rich:column>
					                            <rich:column style="text-align: left;width: 300px" styleClass="ui-state-default" >
					                                <strong><h:outputText value="Descrição" /></strong>
					                            </rich:column>
					                            <rich:column style="text-align: left" styleClass="ui-state-default" >
					                                <strong><h:outputText value="Igreja" /></strong>
					                            </rich:column>
					                    	</rich:columnGroup>
					                  </f:facet>
					 				<rich:columnGroup >	
										<rich:column  >
											<h:outputText value="#{compromisso.titulo}" />
										</rich:column>
										 <rich:column>
											<h:outputText value="#{compromisso.dataFormatada}" />
										</rich:column>	
										 <rich:column>
											<h:outputText value="#{compromisso.descricao}" />
										</rich:column>
										 <rich:column>
											<h:outputText value="#{compromisso.nomeIgrejas}" />
										</rich:column>
										
									</rich:columnGroup>
						</rich:dataTable> 
					
					<rich:datascroller renderIfSinglePage="false" for="tbAgenda"  />
					
				</h:panelGroup>
				
			</div>
				                     
			</h:form>
			
			
		</rich:modalPanel>
		
	</ui:define>
</ui:composition>
